Rotary electric motors such as permanent magnet motors have eigenmodes of mechanical vibration depending on mechanical structures of a rotor, a stator, and a housing. Further, electromagnetic exciting force is generated due to variation of magnetic force between the rotor and the stator with rotation of the rotary electric motor. When a frequency in the eigenmode and a frequency of the electromagnetic exciting force overlap and resonance occurs, large vibration occurs in the rotary electric motor. Such vibration of the rotary electric motor causes noise and causes deterioration of comfortability of a user.
As a conventional technology for suppressing occurrence of vibration in a rotary electric motor, the technology described in PTL 1 is known. In the present technology, a resonance frequency is calculated on the basis of a switching frequency of an inverter and a rotation frequency of a permanent magnet motor, and whether the calculated resonance frequency and a natural vibration frequency of the permanent magnet motor coincide with each other is determined. When it is determined that the resonance frequency and the natural vibration frequency coincide with each other, the switching frequency of the inverter is shifted to avoid occurrence of resonance.